﻿
namespace TinyMceWrapper.Web.Configuration
{

    #region [ Imports ]

    using System.Configuration;
    using System.Diagnostics.CodeAnalysis;

    #endregion

    [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mce")]
    [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
    public sealed class TinyMceOptionCollection : ConfigurationElementCollection
    {

        #region [ Indexers ]

        public TinyMceOption this[int index]
        {
            get { return base.BaseGet(index) as TinyMceOption; }
        }

        public new TinyMceOption this[string key]
        {
            get { return base.BaseGet(key) as TinyMceOption; }
        }

        #endregion

        #region [ Override Members ]

        protected override ConfigurationElement CreateNewElement()
        {
            return new TinyMceOption();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((TinyMceOption)element).Key;
        }

        #endregion

    }

}
